<!DOCTYPE html>
<html lang="zh" class="">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>LearnKu 终身编程者的知识社区</title>
    <link rel="shortcut icon" href="__IMG__/icon.png" />
    <!-- Styles -->
    <link href="__CSS__/vendors.css" rel="stylesheet" />
    <link href="__CSS__/editormd.css" rel="stylesheet" />
    <link href="__CSS__/myself.css" rel="stylesheet" />
    <style type="text/css">
      @font-face {
        font-family: 'FontAwesome';
        src: url('__FONT__/FontAwesome.eot'); /* IE9*/
        src: url('__FONT__/FontAwesome.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('__FONT__/FontAwesome.woff2') format('woff2'), /* chrome、firefox、opera、Safari, Android, iOS */ url('__FONT__/FontAwesome.woff') format('woff'), /* chrome、firefox */ url('__FONT__/FontAwesome.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('__FONT__/FontAwesome.svg#uxFontAwesome') format('svg'); /* iOS 4.1- */
      }
      @media only screen and (max-width: 450px) {
        #navbox {
          display: none !important;
        }
      }
      @media only screen and (max-width: 767px) {
        .ui.fluid.category.search {
          display: none !important;
        }
      }
      @media only screen and (max-width: 967px) {
        #li1,
        #li2,
        #li3,
        #li4 {
          display: none !important;
        }
      }
      .userModel {
        display: block;
        text-align: left;
        background: #fff;
        border: none;
        box-shadow: 1px 3px 3px 0 rgba(0, 0, 0, 0.2), 1px 3px 15px 2px rgba(0, 0, 0, 0.2);
        transform-origin: 50% 25%;
        border-radius: 0.28571429rem;
        margin: 30px auto;
        padding: 20px;
      }
      #navbox {
        display: flex;
        flex-direction: row;
        margin-left: auto;
      }
      .selected {
        cursor: pointer;
        background: rgba(0, 0, 0, 0.03) !important;
        color: rgba(0, 0, 0, 0.95) !important;
      }
      .ui.top.menu {
        border-top: 4px solid #f4645f;
      }
      .text > .item:before {
        width: 0 !important;
      }
    </style>
  </head>

  <body class="auth-register-form-page" style="color: #636b6f; background-color: rgba(240, 242, 245)">
    <div class="pusher" style="margin-bottom: 30px">
      <div class="main container">
        <nav class="ui main borderless menu top" id="topnav">
          <div class="ui container" style="height: 40px">
            <div class="item">
              <img class="ui image" style="width: 26px; height: 26px; margin-top: -2px" src="__IMG__/laravel.png" />
              <span class="site-name ml-2">Laravel</span>
            </div>

            <form class="ui fluid category search item secondary hide-on-991" action="https://learnku.com/search" method="GET">
              <div class="ui icon input">
                <input class="prompt" name="q" type="text" placeholder="搜索" value="" />
                <i class="search icon"></i>
              </div>
              <div class="results"></div>
            </form>
            <!-- 1803010136 顶部导航栏 -->
            <ul id="navbox">
              <li><a href="{:url('index/index')}" class="item secondary">首页</a></li>
              <li id="forumPage">
                <a href="{:url('index/view')}" class="item secondary">论坛</a>
                <ul class="setList">
                  <li><a href="{:url('index/view')}">All</a></li>
                  {volist name="section" id="sectionItem"}
                  <li><a href="{:url('index/view',['sid'=>$sectionItem.s_id])}">{$sectionItem.s_name}</a></li>
                  {/volist}
                </ul>
              </li>
              <li><a href="{:url('index/changepa')}" class="item secondary selected">社区</a></li>
              <li><a href="{:url('index/me')}" class="item secondary">Wiki</a></li>
              <li><a href="{:url('index/me')}" class="item secondary">上传头像</a></li>
              <li id="li4"><a href="{:url('user/login')}" class="item secondary">登录</a></li>
              <li id="li3"><a href="{:url('user/reg')}" class="item secondary">注册</a></li>
              <li id="li2"><a href="{:url('index/logout')}" class="item secondary">注销</a></li>
              <li id="li1" class="item secondary">
                {if session('name') } 欢迎用户:
                <?=session('name');?>
                <img id="u_img" src="__UPLOAD__/<?=session('uImg')?>" />
                {else /}请登录 {/if}
              </li>
            </ul>
          </div>
        </nav>
      </div>
    </div>
    <!-- start -->
    <div style="min-height: 400px">
      <div class="ui centered grid container stackable">
        <div class="column">
          <div class="ui segment">
            <div class="ui right rail rm-link-color lh-3 ml-1 mt-3 pl-4">
              <p>
                <b>技巧:</b>
              </p>
              <p>
                <a class="" href="https://learnku.com/docs/writing-docs/editor-guide/3958" target="_blank"> MD 语法 </a>
              </p>
              <p>
                <a class="" href="https://learnku.com/docs/writing-docs/typesetting-specification/1775" target="_blank"> 排版规范 </a>
              </p>
              <p>
                <a class="" href="https://learnku.com/docs/guide/how-do-i-insert-pictures-in-articles-or-comments/4472" target="_blank"> 上传图片 </a>
              </p>
              <p>
                <a class="" href="https://learnku.com/docs/guide/how-to-remove-the-shadow-of-the-picture/4474" target="_blank"> 图片阴影 </a>
              </p>
              <p>
                <a class="" href="https://learnku.com/docs/guide/how-to-set-the-image-size/4475" target="_blank"> 图片大小 </a>
              </p>
              <p>
                <a class="" href="https://learnku.com/docs/writing-docs/clean-screenshots/1778" target="_blank"> 干净的截图 </a>
              </p>
              <p>
                <a class="" href="https://learnku.com/docs/writing-docs/paraphrase-the-screen-when-it-is-screenshot/1776" target="_blank"> 截屏要释义 </a>
              </p>

              <p>
                <a class="" href="https://learnku.com/docs/guide/blog-added-series-articles-function/7096" target="_blank"> 系列文章 </a>
              </p>
            </div>

            <a class="ui right corner label compose-help" href="javascript:;">
              <i class="info icon"></i>
            </a>

            <div class="content extra-padding">
              <div class="ui header text-center text gery" style="margin: 10px 0 40px"><i class="icon paint brush"></i> 新建博文</div>

              <div><?=session("name")."\t".date('Y-m-d H:i:s')?></div>

              <form method="POST" action="{:url('index/doPost')}" accept-charset="UTF-8" id="article-create-form" class="ui form">
                <div class="fields">
                  <div class="four wide field" id="selections">
                    <div class="ui fluid search selection dropdown">
                      <i class="dropdown icon"></i>
                      <div class="text">
                        <span>默认当前社区</span>
                      </div>
                      <input type="hidden" name="sid" value="{:input('sid')}" />
                      <div class="menu transition hidden" tabindex="-1">
                        <div class="item active selected" data-value="{:input('sid')}">默认当前社区</div>
                        {volist name="section" id="secItem"}
                        <div class="item" data-value="{$i}">
                          <img class="ui image secDownlist" src="__IMG__/{$secItem.s_pic}" />
                          <span>{$secItem.s_name}</span>
                        </div>
                        {/volist}
                      </div>
                      <div class="results"></div>
                    </div>
                  </div>
                  <script>
                    document.querySelector();
                  </script>
                  <select style="width: auto" name="mtype">
                    <option value="博客">博客</option>
                    <option value="分享">分享</option>
                    <option value="生活">生活</option>
                    <option value="文档">文档</option>
                    <option value="问答">问答</option>
                  </select>

                  <div class="twelve wide field">
                    <input class="form-control" type="text" name="mtitle" id="title-field" value="" placeholder="标题" />
                  </div>
                </div>

                <div class="field editor">
                  <div id="editormd" class="editormd editormd-vertical" style="width: 100%; height: 100%">
                    <textarea rows="15" id="body-field" name="mcontent" placeholder="请输入内容" style="height: 100%"></textarea>
                  </div>
                </div>

                <div class="ui message">
                  <button type="submit" class="ui button primary publish-btn loading-on-clicked" id="">
                    <i class="icon send"></i>
                    发布文章
                  </button>

                  &nbsp;&nbsp;or&nbsp;&nbsp;
                  <button class="ui button" type="submit" name="subject" value="draft"><i class="icon save"></i> 保存草稿</button>

                  <a class="pull-right" href="https://learnku.com/docs/writing-docs/editor-guide/3958" target="_blank" style="color: #777; font-size: 0.9em; text-decoration: underline; margin-top: 8px"> <i class="icon wpforms"></i> 编辑器使用指南 </a>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- end -->
    <div class="ui inverted vertical footer segment" style="margin-top: 30px">
      <div class="ui center aligned container">
        <div class="ui stackable inverted divided grid">
          <div class="four wide column">
            <h4 class="ui inverted header">
              <img src="__IMG__/icon2.png" alt="" style="width: 32px; border-radius: 6px; position: relative; top: -5px" />
              关于 LearnKu
            </h4>
            <div class="ui inverted text-center">
              <div class="lh-3">LearnKu 是终身编程者的修道场</div>
              <div class="lh-3">摒弃世俗浮躁，追求技术精湛</div>
            </div>

            <div class="ui inverted text-center mt-3 rm-link-color tdu"><i class="icon birthday"></i> <a href="https://learnku.com/articles/28735">LearnKu 诞生的故事</a></div>
          </div>
          <div class="four wide column">
            <h4 class="ui inverted header">资源推荐</h4>
            <div class="ui inverted link list">
              <li class="mb-1">
                <a class="item" href="https://learnku.com/docs/guide"> 《社区使用指南》 </a>
              </li>
              <li class="mb-1">
                <a class="item" href="https://learnku.com/docs/writing-docs"> 《文档撰写指南》 </a>
              </li>
              <li class="mb-1">
                <a class="item" href="https://learnku.com/docs/guide/protocol/4992"> 《LearnKu 社区规范》 </a>
              </li>
            </div>
          </div>
          <div class="four wide column">
            <h4 class="ui inverted header">赞助商</h4>
            <div class="ui inverted link list">
              <a href="https://passport.ucloud.cn/?invitation_code=rami45zj5kpm&amp;ytag=reZ5E7" rel="nofollow noopener noreferrer" class="item" target="_blank" style="line-height: 28px">
                <img src="__IMG__/sponsor1.png" title="本站服务器由 UCloud 赞助" class="ui popover" style="height: 20px; margin-bottom: -4px; margin-right: 3px; display: inline-block" />
              </a>
              <a href="https://www.upyun.com/" rel="nofollow noopener noreferrer" class="item" target="_blank" style="line-height: 28px">
                <img src="__IMG__/sponsor2.png" title="社区 CDN 赞助商" class="ui popover" style="height: 20px; margin-bottom: -4px; margin-right: 3px; display: inline-block" />
              </a>
              <a href="http://www.sendcloud.net/" rel="nofollow noopener noreferrer" class="item" target="_blank" style="line-height: 28px">
                <img src="__IMG__/sponsor3.png" title="订阅邮件赞助商：SendCloud" class="ui popover" style="height: 20px; margin-bottom: -4px; margin-right: 3px; display: inline-block" />
              </a>
            </div>
          </div>
          <div class="four wide column">
            <h4 class="ui inverted header">其他信息</h4>
            <div class="ui inverted link list">
              <li>
                <a class="item" href="https://learnku.com/contact?code=outsource"> <i class="icon thumbs up"></i> 软件外包 </a>
              </li>
              <li>
                <a class="item" href="https://learnku.com/docs/guide/administrator/4485"> <i class="icon heartbeat"></i> 成为版主 </a>
              </li>
              <li>
                <a class="item" href="https://learnku.com/quizzes"> <i class="icon wpforms"></i> 所有测验 </a>
              </li>
              <li>
                <a class="item" href="https://learnku.com/contact"> <i class="icon wechat" aria-hidden="true"></i> 联系站长（反馈建议） </a>
              </li>
            </div>
          </div>
        </div>

        <div class="ui inverted section divider"></div>
        <div style="color: rgb(137, 137, 140); font-size: 0.9em" class="rm-link-color">
          <p>
            <a href="http://beian.miit.gov.cn/" target="_blank">粤ICP备18099781号-6</a>
            <span class="mx-2">|</span>
            <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030502004330" target="_blank"><img src="__IMG__/copyright.png" width="20" style="position: relative; top: 4px" /> 粤公网安备 44030502004330号</a>
            <span class="mx-2">|</span>
            <a href="https://learnku.com/lk">违法和不良信息举报</a>
          </p>
          <p style="margin-top: -8px; margin-bottom: -0px" class="ui inverted signature">由 <a href="https://learnku.com/contact" target="_blank" style="color: inherit">Summer</a> 设计和编码 <span style="color: #e27575; font-size: 14px">❤</span></p>
        </div>
      </div>
    </div>

    <script type="text/javascript">
      let forumPage = document.querySelector('#forumPage');
      let setList = document.querySelector('.setList');
      forumPage.onmouseover = function () {
        setList.style.display = 'flex';
      };
      forumPage.onmouseout = function () {
        setList.style.display = 'none';
      };
    </script>
    <script type="text/javascript">
      //post下拉菜单
      let selections = document.querySelector('#selections');
      selections.addEventListener('click', () => {
        let a = document.querySelector('.ui.fluid.search.selection.dropdown');
        if (a.classList.contains('visible')) {
          a.classList.remove('active', 'visible');
        } else {
          a.classList.add('active', 'visible');
        }

        let b = document.querySelector('.menu.transition');
        if (b.classList.contains('visible')) {
          b.classList.remove('visible');
          b.classList.add('hidden');
        } else {
          b.classList.remove('hidden');
          b.classList.add('visible');
        }
      });
      document.querySelectorAll('.item').forEach((item) => {
        item.addEventListener('click', (event) => {
          // 给隐藏域赋值s_id 板块号
          let input = document.querySelector("[name='sid']");
          input.value = item.dataset.value;
          // 克隆节点 否则替换时旧节点会删除
          let clonedNode = item.cloneNode(true);
          let d = document.querySelector('.dropdown>.text');
          let child = document.querySelector('.dropdown>.text>span');
          if (d.querySelector('.item')) {
            child = d.querySelector('.item');
            d.replaceChild(clonedNode, child);
          } else {
            d.replaceChild(clonedNode, child);
          }
        });
      });
    </script>
  </body>
</html>
